<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>对象构造器</title>
	<script>
		
	
		function Arr() {

			this.get_sum = function (arr) {
				sum = 0;

				for(var i in arr){
					sum += arr[i];
				}

				return sum;
			}
			
			this.get_max = function (arr) {
				max = arr[0];

				for(var i in arr){
					if(arr[i]>max){
						max = arr[i];
					}
				}

				return max;
			}
			this.get_ou =  function () {
				for(var i in arr){
					if(arr[i]%2==1){
						arr[i] = arr[i]*2;
					}
				}
				return arr;
			}
		}

		obj = new Arr();

		obj1 = new Arr();

		res = obj.get_max([567567,567,56,56]);

		document.write(res)






	</script>
</head>
<body>
	
</body>
</html>